/*
 * zip_extract_SNMP.h
 *
 * Created: 01.07.2013 17:50:45
 *  Author: ILYA
 */ 

/* before using this module be shure, that you have (255 * 2 = 510) free spaces on your RAM*/

#ifndef ZIP_EXTRACT_SNMP_H_
#define ZIP_EXTRACT_SNMP_H_
#include "General_definitions.h"
#include "CfgParams.h"
#include "mib_functions.h"

#define SNMP_V1							0
/*this is the sum of all sizeof(variables), the variables from all variables which must be using by SNMP (for getting, or setting)*/
#define MAX_SIZE_OF_BINDED_VARIABLES	255

typedef struct
{
	unsigned char version;
	unsigned char command;
	unsigned char err_code;
	unsigned char length_bindedVariables;//this is the zipped Variables length
	/*the pointer bindedVariables contains: 
	(for command get)OID1+OID2+OID3...
	(for command set)OID1+data1_length+data1+OID2+data2_length+data2...
	comment: the OID is only tail of OID, and its size is equal to 1byte
	*/
	//unsigned char *bindedVariables;//dont use this field
} TSzippedsnmp;

void zip_snmp_packet(const char *snmp_packet, char **snmp_zipped_packet);
void extract_snmp_packet(const char *snmp_zipped_packet, char **snmp_packet);

#endif /* ZIP_EXTRACT_SNMP_H_ */